package com.itheima.pai.exception.demo01;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class ExceptionDemo02 {

    public static void main(String[] args) throws ParseException {

//        parse();

        try{
            parse();
        }catch (ParseException e){
            e.printStackTrace();
        }
        System.out.println("程序结束了........");

    }

    public static void parse() throws ParseException {

        String s = "2019-08-28";

        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy年MM月dd日");

        Date date = simpleDateFormat.parse(s);

        System.out.println(date);

    }

}
